<?php 
use \PsiFramework\Classes\Util\UI\Printer;
use \PsiFramework\Classes\Util\UI\HTML;
use \PsiFramework\Classes\Util\HTTP\AuthenticationManager;
use \PsiFramework\Classes\Util\UI\LanguageManager;

$debug = $response->getAttribute("debug");
$logger = $response->getAttribute("logger");
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Admin</title>

<!-- meta -->
<meta name="description" content="Admoin">
<meta name="author" content="Rémi San">

</head>
<body>
    <div id="wrapper">
        <header>
            <?php 
            $languageManager = LanguageManager::getInstance();
            $action = "Authenticate" ;
            $text = "LOGOUT" ;
            if (AuthenticationManager::getInstance()->getAuthenticatedUser()===null) {
                $action = "Login" ;
                $text = "LOGIN" ;
            }
            $text = $languageManager->getText($text);
            echo HTML::link($text, "action=".$action);
            ?>
        </header>
        <menu>
            <li><?php echo HTML::link("Utilisateurs", "action=CMS.List&type=User"); ?>
            </li>
        </menu>
        <div>
            <?php $templateManager->displayTemplate('main');  ?>
        </div>
    </div>
    <?php $templateManager->displayTemplate('Debug', $response);  ?>
</body>
</html>
